const mongoose = require("mongoose")
mongoose.connect("mongodb+srv://2837023560:aA13784425987@cluster0.uhxhy.mongodb.net/threexm")
    .then(() => {
        console.log("数据库连接成功")
    })
    .catch((err) => {
        console.log(err)
    })
let goodSchmea=new mongoose.Schema({
    name:String,
    price:String,
    img:String,
    cate:String,
    area:String,
    num:{
        type:Number,
        default:1
    },
    brand:String,
    storage:String,
})
let GoodModel = mongoose.model("good", goodSchmea,"good")
module.exports = {GoodModel}